package com.loves.admin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

@TableName(value = "pms_product_category")
public class ProductCategory {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    private String parentId;

    private Integer level;

    private Boolean navStatus;

    private Boolean showStatus;

    private Integer sort;

    private String icon;

    private String description;

    private LocalDateTime createDate;

    private String createName;

    private Boolean deleteFlag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Boolean getNavStatus() {
        return navStatus;
    }

    public void setNavStatus(Boolean navStatus) {
        this.navStatus = navStatus;
    }

    public Boolean getShowStatus() {
        return showStatus;
    }

    public void setShowStatus(Boolean showStatus) {
        this.showStatus = showStatus;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }


    public static final class Builder {
        private String id;
        private String parentId;
        private Integer level;
        private Boolean navStatus;
        private Boolean showStatus;
        private Integer sort;
        private String icon;
        private String description;
        private LocalDateTime createDate;
        private String createName;
        private Boolean deleteFlag;

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder parentId(String parentId) {
            this.parentId = parentId;
            return this;
        }

        public Builder level(Integer level) {
            this.level = level;
            return this;
        }

        public Builder navStatus(Boolean navStatus) {
            this.navStatus = navStatus;
            return this;
        }

        public Builder showStatus(Boolean showStatus) {
            this.showStatus = showStatus;
            return this;
        }

        public Builder sort(Integer sort) {
            this.sort = sort;
            return this;
        }

        public Builder icon(String icon) {
            this.icon = icon;
            return this;
        }

        public Builder description(String description) {
            this.description = description;
            return this;
        }

        public Builder createDate(LocalDateTime createDate) {
            this.createDate = createDate;
            return this;
        }

        public Builder createName(String createName) {
            this.createName = createName;
            return this;
        }

        public Builder deleteFlag(Boolean deleteFlag) {
            this.deleteFlag = deleteFlag;
            return this;
        }

        public ProductCategory build() {
            ProductCategory productCategory = new ProductCategory();
            productCategory.setId(id);
            productCategory.setParentId(parentId);
            productCategory.setLevel(level);
            productCategory.setNavStatus(navStatus);
            productCategory.setShowStatus(showStatus);
            productCategory.setSort(sort);
            productCategory.setIcon(icon);
            productCategory.setDescription(description);
            productCategory.setCreateDate(createDate);
            productCategory.setCreateName(createName);
            productCategory.setDeleteFlag(deleteFlag);
            return productCategory;
        }
    }
}
